{template newheader}
<script>
$(document).ready(function() {

//选择一级区域
$('#oneid').change(function(){
	$("#stwoid").html('<img src="'+siteUrl+'public/image/loading.gif" />');
	var oneid = $(this).children('option:selected').val();  //弹出select的值
	
	if(oneid==0){
		$("#stwoid").html('');
		$("#sthreeid").html('');
	}else{
		$("#sthreeid").html('');
		$.ajax({
			type: "GET",
			url:  "{SITE_URL}index.php?app=user&ac=area&ts=two&oneid="+oneid,
			success: function(msg){
				$("#stwoid").html(msg);
				
				//选择二级区域
				$('#twoid').change(function(){
					$("#sthreeid").html('<img src="'+siteUrl+'public/image/loading.gif" />');
					var twoid = $(this).children('option:selected').val();  //弹出select的值
					
					if(twoid == 0){
						$("#sthreeid").html('');
					}else{
					
						//ajax
						$.ajax({
							type: "GET",
							url:  "{SITE_URL}index.php?app=user&ac=area&ts=three&twoid="+twoid,
							success: function(msg){
								$('#sthreeid').html(msg);
							}
						});
					
					}

				});
				
			}
		});
	
	}
	
});

});
</script>
<div id="wrapper">
	<div class="single co5">
{template set_menu}

		<div class="set_box">
当前常居地：<!--{if $strArea}-->
{$strArea[one][areaname]} 
{$strArea[two][areaname]} 
{$strArea[three][areaname]} 
<!--{else}-->
火星
<!--{/if}-->
<br />
			
<form method="POST" action="{SITE_URL}index.php?app=user&ac=do&ts=setcity">
        	<ul class="form_l">
<select id="oneid" name="oneid">
<option value="0">请选择</option>
<!--{loop $arrOne $key $item}-->
<option value="{$item[areaid]}">{$item[areaname]}</option>
<!--{/loop}-->
</select>
<span id="stwoid"></span>
<span id="sthreeid"></span>
<br />
<br />

				<li class="submit">

				  <input class="btn" type="submit" name="Submit" value="保存" id="Submit" />

				</li>

        	</ul>

        </div>

	  

	</div>

</form>

</div>

{template footer}